.class Lcom/TwinBlade/PicturePassword/l;
.super Landroid/graphics/drawable/Drawable;
.source "SourceFile"

# interfaces
.implements Ljava/lang/Runnable;


# instance fields
.field private a:Ljava/lang/String;

.field private b:Landroid/graphics/drawable/Drawable;

.field private c:Landroid/graphics/Paint;

.field private d:Landroid/graphics/Paint;

.field private e:F

.field private f:Z

.field private g:F

.field private h:I

.field private i:Lcom/TwinBlade/PicturePassword/k;


# direct methods
.method public constructor <init>(Landroid/content/res/Resources;Ljava/lang/String;Z)V
    .locals 5
    .parameter
    .parameter
    .parameter

    .prologue
    const/4 v0, 0x1

    .line 361
    invoke-direct {p0}, Landroid/graphics/drawable/Drawable;-><init>()V

    .line 362
    iput-object p2, p0, Lcom/TwinBlade/PicturePassword/l;->a:Ljava/lang/String;

    .line 363
    const v1, 0x108006c

    invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, p0, Lcom/TwinBlade/PicturePassword/l;->b:Landroid/graphics/drawable/Drawable;

    .line 364
    new-instance v1, Landroid/graphics/Paint;

    invoke-direct {v1, v0}, Landroid/graphics/Paint;-><init>(I)V

    iput-object v1, p0, Lcom/TwinBlade/PicturePassword/l;->c:Landroid/graphics/Paint;

    .line 365
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/l;->c:Landroid/graphics/Paint;

    sget-object v2, Landroid/graphics/Typeface;->DEFAULT_BOLD:Landroid/graphics/Typeface;

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;

    .line 366
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/l;->c:Landroid/graphics/Paint;

    const/high16 v2, 0x4180

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setTextSize(F)V

    .line 367
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/l;->c:Landroid/graphics/Paint;

    const/high16 v2, -0x100

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setColor(I)V

    .line 368
    new-instance v1, Landroid/graphics/Paint;

    iget-object v2, p0, Lcom/TwinBlade/PicturePassword/l;->c:Landroid/graphics/Paint;

    invoke-direct {v1, v2}, Landroid/graphics/Paint;-><init>(Landroid/graphics/Paint;)V

    iput-object v1, p0, Lcom/TwinBlade/PicturePassword/l;->d:Landroid/graphics/Paint;

    .line 369
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/l;->d:Landroid/graphics/Paint;

    sget-object v2, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 370
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/l;->d:Landroid/graphics/Paint;

    const/high16 v2, 0x4040

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    .line 371
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/l;->d:Landroid/graphics/Paint;

    const v2, -0x44003d00

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setColor(I)V

    .line 372
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/l;->d:Landroid/graphics/Paint;

    new-instance v2, Landroid/graphics/BlurMaskFilter;

    const/high16 v3, 0x3f80

    sget-object v4, Landroid/graphics/BlurMaskFilter$Blur;->NORMAL:Landroid/graphics/BlurMaskFilter$Blur;

    invoke-direct {v2, v3, v4}, Landroid/graphics/BlurMaskFilter;-><init>(FLandroid/graphics/BlurMaskFilter$Blur;)V

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setMaskFilter(Landroid/graphics/MaskFilter;)Landroid/graphics/MaskFilter;

    .line 373
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/l;->d:Landroid/graphics/Paint;

    iget-object v2, p0, Lcom/TwinBlade/PicturePassword/l;->a:Ljava/lang/String;

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v1

    iput v1, p0, Lcom/TwinBlade/PicturePassword/l;->e:F

    .line 374
    if-eqz p3, :cond_0

    :goto_0
    int-to-float v0, v0

    iput v0, p0, Lcom/TwinBlade/PicturePassword/l;->g:F

    .line 375
    new-instance v0, Lcom/TwinBlade/PicturePassword/k;

    invoke-direct {v0}, Lcom/TwinBlade/PicturePassword/k;-><init>()V

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/l;->i:Lcom/TwinBlade/PicturePassword/k;

    .line 376
    return-void

    .line 374
    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method


# virtual methods
.method public draw(Landroid/graphics/Canvas;)V
    .locals 7
    .parameter

    .prologue
    const/16 v1, 0xff

    const/16 v2, 0x7f

    const/high16 v6, 0x40c0

    .line 415
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/l;->b:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v0, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V

    .line 417
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/l;->i:Lcom/TwinBlade/PicturePassword/k;

    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/k;->hasStarted()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/l;->i:Lcom/TwinBlade/PicturePassword/k;

    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/k;->hasEnded()Z

    move-result v0

    if-nez v0, :cond_0

    .line 419
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/l;->i:Lcom/TwinBlade/PicturePassword/k;

    invoke-static {}, Landroid/view/animation/AnimationUtils;->currentAnimationTimeMillis()J

    move-result-wide v3

    const/4 v5, 0x0

    invoke-virtual {v0, v3, v4, v5}, Lcom/TwinBlade/PicturePassword/k;->getTransformation(JLandroid/view/animation/Transformation;)Z

    .line 420
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/l;->i:Lcom/TwinBlade/PicturePassword/k;

    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/k;->a()F

    move-result v0

    iput v0, p0, Lcom/TwinBlade/PicturePassword/l;->g:F

    .line 425
    :cond_0
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/l;->getBounds()Landroid/graphics/Rect;

    move-result-object v0

    .line 426
    iget v3, p0, Lcom/TwinBlade/PicturePassword/l;->g:F

    invoke-virtual {v0}, Landroid/graphics/Rect;->width()I

    move-result v4

    int-to-float v4, v4

    iget v5, p0, Lcom/TwinBlade/PicturePassword/l;->e:F

    sub-float/2addr v4, v5

    sub-float/2addr v4, v6

    sub-float/2addr v4, v6

    mul-float/2addr v3, v4

    add-float/2addr v3, v6

    .line 427
    invoke-virtual {v0}, Landroid/graphics/Rect;->height()I

    move-result v0

    int-to-float v0, v0

    iget-object v4, p0, Lcom/TwinBlade/PicturePassword/l;->c:Landroid/graphics/Paint;

    invoke-virtual {v4}, Landroid/graphics/Paint;->getTextSize()F

    move-result v4

    add-float/2addr v0, v4

    const/high16 v4, 0x4000

    div-float v4, v0, v4

    .line 428
    iget-object v5, p0, Lcom/TwinBlade/PicturePassword/l;->d:Landroid/graphics/Paint;

    iget-boolean v0, p0, Lcom/TwinBlade/PicturePassword/l;->f:Z

    if-eqz v0, :cond_1

    move v0, v1

    :goto_0
    invoke-virtual {v5, v0}, Landroid/graphics/Paint;->setAlpha(I)V

    .line 429
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/l;->c:Landroid/graphics/Paint;

    iget-boolean v5, p0, Lcom/TwinBlade/PicturePassword/l;->f:Z

    if-eqz v5, :cond_2

    :goto_1
    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAlpha(I)V

    .line 430
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/l;->a:Ljava/lang/String;

    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/l;->d:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v3, v4, v1}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 431
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/l;->a:Ljava/lang/String;

    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/l;->c:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v3, v4, v1}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 432
    return-void

    :cond_1
    move v0, v2

    .line 428
    goto :goto_0

    :cond_2
    move v1, v2

    .line 429
    goto :goto_1
.end method

.method public getOpacity()I
    .locals 1

    .prologue
    .line 436
    const/4 v0, -0x3

    return v0
.end method

.method public isStateful()Z
    .locals 1

    .prologue
    .line 393
    const/4 v0, 0x1

    return v0
.end method

.method protected onBoundsChange(Landroid/graphics/Rect;)V
    .locals 1
    .parameter

    .prologue
    .line 380
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/l;->b:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v0, p1}, Landroid/graphics/drawable/Drawable;->setBounds(Landroid/graphics/Rect;)V

    .line 381
    return-void
.end method

.method protected onLevelChange(I)Z
    .locals 5
    .parameter

    .prologue
    const-wide/16 v3, 0x32

    .line 399
    const/16 v0, 0xfa0

    if-ge p1, v0, :cond_1

    iget v0, p0, Lcom/TwinBlade/PicturePassword/l;->h:I

    if-gtz v0, :cond_1

    .line 401
    const/4 v0, 0x1

    iput v0, p0, Lcom/TwinBlade/PicturePassword/l;->h:I

    .line 402
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/l;->i:Lcom/TwinBlade/PicturePassword/k;

    iget v1, p0, Lcom/TwinBlade/PicturePassword/l;->g:F

    const/high16 v2, 0x3f80

    invoke-virtual {v0, v1, v2}, Lcom/TwinBlade/PicturePassword/k;->a(FF)V

    .line 403
    invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J

    move-result-wide v0

    add-long/2addr v0, v3

    invoke-virtual {p0, p0, v0, v1}, Lcom/TwinBlade/PicturePassword/l;->scheduleSelf(Ljava/lang/Runnable;J)V

    .line 410
    :cond_0
    :goto_0
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/l;->b:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v0, p1}, Landroid/graphics/drawable/Drawable;->setLevel(I)Z

    move-result v0

    return v0

    .line 404
    :cond_1
    const/16 v0, 0x1770

    if-le p1, v0, :cond_0

    iget v0, p0, Lcom/TwinBlade/PicturePassword/l;->h:I

    if-ltz v0, :cond_0

    .line 406
    const/4 v0, -0x1

    iput v0, p0, Lcom/TwinBlade/PicturePassword/l;->h:I

    .line 407
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/l;->i:Lcom/TwinBlade/PicturePassword/k;

    iget v1, p0, Lcom/TwinBlade/PicturePassword/l;->g:F

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Lcom/TwinBlade/PicturePassword/k;->a(FF)V

    .line 408
    invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J

    move-result-wide v0

    add-long/2addr v0, v3

    invoke-virtual {p0, p0, v0, v1}, Lcom/TwinBlade/PicturePassword/l;->scheduleSelf(Ljava/lang/Runnable;J)V

    goto :goto_0
.end method

.method protected onStateChange([I)Z
    .locals 2
    .parameter

    .prologue
    .line 385
    sget-object v0, Lcom/TwinBlade/PicturePassword/e;->a:[I

    invoke-static {v0, p1}, Landroid/util/StateSet;->stateSetMatches([I[I)Z

    move-result v0

    .line 386
    sget-object v1, Lcom/TwinBlade/PicturePassword/e;->b:[I

    invoke-static {v1, p1}, Landroid/util/StateSet;->stateSetMatches([I[I)Z

    move-result v1

    or-int/2addr v0, v1

    .line 385
    iput-boolean v0, p0, Lcom/TwinBlade/PicturePassword/l;->f:Z

    .line 387
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/l;->invalidateSelf()V

    .line 388
    const/4 v0, 0x0

    return v0
.end method

.method public run()V
    .locals 4

    .prologue
    .line 448
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/l;->i:Lcom/TwinBlade/PicturePassword/k;

    invoke-static {}, Landroid/view/animation/AnimationUtils;->currentAnimationTimeMillis()J

    move-result-wide v1

    const/4 v3, 0x0

    invoke-virtual {v0, v1, v2, v3}, Lcom/TwinBlade/PicturePassword/k;->getTransformation(JLandroid/view/animation/Transformation;)Z

    .line 450
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/l;->i:Lcom/TwinBlade/PicturePassword/k;

    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/k;->a()F

    move-result v0

    iput v0, p0, Lcom/TwinBlade/PicturePassword/l;->g:F

    .line 451
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/l;->i:Lcom/TwinBlade/PicturePassword/k;

    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/k;->hasEnded()Z

    move-result v0

    if-nez v0, :cond_0

    .line 452
    invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J

    move-result-wide v0

    const-wide/16 v2, 0x32

    add-long/2addr v0, v2

    invoke-virtual {p0, p0, v0, v1}, Lcom/TwinBlade/PicturePassword/l;->scheduleSelf(Ljava/lang/Runnable;J)V

    .line 454
    :cond_0
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/l;->invalidateSelf()V

    .line 456
    return-void
.end method

.method public setAlpha(I)V
    .locals 0
    .parameter

    .prologue
    .line 441
    return-void
.end method

.method public setColorFilter(Landroid/graphics/ColorFilter;)V
    .locals 0
    .parameter

    .prologue
    .line 445
    return-void
.end method
